package com.dup.jxlh.api.utils;

import com.dup.jxlh.api.entities.CommonResult;
import com.dup.jxlh.api.enums.ResultEnum;

public class ResultUtil {
    public static CommonResult result(ResultEnum resultEnum, Object object) {
        return new CommonResult<>(
                resultEnum.getCode(),
                resultEnum.getMsg(),
                object
        );
    }

    public static CommonResult result(ResultEnum resultEnum) {
        return result(resultEnum, null);
    }
}
